<% include ../head %>
<%
    data = data || "";
    function findAttribute(attr,defaultValue) {
       var m = data.match(attr);
       return m ? m[1] : defaultValue;
    }
    var creator = item['twitter'] || findAttribute(/:twitter: *(.+)/,'neo4j');
    var gist_title = item['title'] || findAttribute(/^=+ *(.+)/,title||'A Neo4j Graph Gist');
    var gist_img = item['img'] || findAttribute(/image::(.+)\[/,asset('img/neo4j/neo4j-logo.png'));
%>
<meta name="twitter:site" content="@neo4j">
<meta name="twitter:domain" content="http://neo4j.org">
<meta name="twitter:creator" content="@<%=creator||'neo4j'%>">
<meta name="twitter:title" content="<%=gist_title||'A Neo4j GraphGist'%>">
<meta name="twitter:description" content="<%=item['introText']||''%>">
<meta name="twitter:card" content="<%=item['img'] ? 'summary_large_image':'summary' %>">
<meta name="twitter:image:src" content="<%=gist_img||asset('img/neo4j/neo4j-logo.png') %>">

<div class="mainpage">

    <!--<!DOCTYPE html>-->

<!--<html>-->
<!--<head>-->
    <!--<meta charset="utf-8">-->
    <!--<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">-->
    <!--<title>Neo4j GraphGist</title>-->

    <script type="text/javascript">
        if (!window.console || !('log' in window.console)) {
            window.console = {log: function () {
            }};
        }
    </script>
    <script src="http://gist.neo4j.org/js/opal.js"></script>
    <script src="http://gist.neo4j.org/js/asciidoctor.js"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <script type="text/javascript" src="http://gist.neo4j.org/js/jquery-ui-1.10.3.custom.min.js"></script>
    <script src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.4.8/d3.min.js"></script>

    <!--MathJAX-->
    <script type="text/x-mathjax-config;executed=true">
        MathJax.Hub.Config({
        tex2jax: { inlineMath: [['$','$'],['\\(','\\)']] }
        });

    </script>
    <script type="text/javascript"
            src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>

    <!-- Bootstrap -->
    <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet">
    <script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
    <link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
    <!--<script src="http://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.9/require.min.js"></script>-->
    <script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>

    <!-- Social -->
    <script src="http://platform.twitter.com/widgets.js"></script>

    <link href="http://gist.neo4j.org/css//datatable.css" rel="stylesheet">
    <link href="http://gist.neo4j.org/css//d3.css" rel="stylesheet">
    <!--link href="http://gist.neo4j.org/css//versal_gadget.css" rel="stylesheet"-->
    <script src="http://gist.neo4j.org/js/jquery.dataTables.min.js"></script>
    <script src="http://gist.neo4j.org/js/cypher.datatable.js"></script>

    <!-- neod3 -->
    <link href="http://gist.neo4j.org/css//neod3.css" rel="stylesheet">
    <script src="http://gist.neo4j.org/js/neod3.js"></script>
    <script src="http://gist.neo4j.org/js/neod3-visualization.js"></script>
    <!--script src="http://gist.neo4j.org/js/visualization.js"></script-->

    <script src="http://gist.neo4j.org/js/console.js"></script>
    <script src="http://gist.neo4j.org/js/gist.js"></script>
    <script src="http://gist.neo4j.org/js/dot.js"></script>
    <script src="http://gist.neo4j.org/js/graphgist.js"></script>
    <script src="http://gist.neo4j.org/js/base64.js"></script>
    <script src="http://gist.neo4j.org/js/mutate.min.js"></script>

    <!--versal widget-->
    <!--script src="http://gist.neo4j.org/js/versal_color_manager.js"></script-->
    <!--script src="http://gist.neo4j.org/js/versal_visualization.js"></script-->



    <!-- Syntax Highlighter -->
    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/codemirror/4.0.3/codemirror.min.css">
    <script src="//cdnjs.cloudflare.com/ajax/libs/codemirror/4.0.3/codemirror.min.js"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/codemirror/4.0.3/addon/runmode/runmode.min.js"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/codemirror/4.0.3/mode/javascript/javascript.min.js"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/codemirror/4.0.3/mode/sql/sql.min.js"></script>
    <link rel="stylesheet" href="http://gist.neo4j.org/css//codemirror-neo.css">
    <script src="http://gist.neo4j.org/js/codemirror-cypher.js"></script>
    <script src="http://gist.neo4j.org/js/colorize.js"></script>

    <link href="http://gist.neo4j.org/css//style.css" rel="stylesheet">

    <link href="/assets/new/css/main.css" rel="stylesheet">


    <link rel="icon" href="favicon.ico"/>
    <link rel="shortcut icon" href="favicon.ico"/>
    <style type="text/css">
        #sidebar_right {
           position: absolute;
           top: 5em;
           left: -15em;
        }
        #graphgist_navbar {
           margin-top: 1em;
        }

        .image img {
            width: auto;
        }

        #gist_link {
            background-image: linear-gradient(to bottom, #00546a, #00647a);
            color: #ffffff;
            background-repeat: repeat-x;
        }

        #status {
            color: #ffffff;
        }


        .label-success, .badge-success, .btn-success:hover, .btn-small:hover {
            background-color: #00546a;
        }
    </style>
<!--</head>-->

<!--<body>-->

<div id="graphgist_navbar" class="navbar">
    <div class="navbar-inner">

        <a class="brand" href="/learn/graphgist">
            <img style="height: 40px;" src="http://gist.neo4j.org/images/neo4j-gray_60x80.png"> Neo4j GraphGist
        </a>

        <div class="btn-group">
            <a class="btn dropdown-toggle" data-toggle="dropdown" data-target="#">
                <i class="icon-external-link"></i> Resources
                <span class="caret"></span>
            </a>
            <ul class="dropdown-menu">
                <li><a href="http://docs.neo4j.org/chunked/stable/cypher-query-lang.html"
                       target="_blank">
                    <i class="icon-book"></i> Cypher Manual
                </a></li>
                <li><a href="http://docs.neo4j.org/refcard/stable/" target="_blank">
                    <i class="icon-columns"></i> Cypher Refcard
                </a></li>
                <li>
                    <a href="./?5956246"><i class="icon-question-sign"></i>
                        How to create a GraphGist</a>
                </li>
                <li>
                    <a href="/learn/graphgist#related"><i class="icon-list"></i>
                        The Graphgist Collection</a>
                </li>
            </ul>
        </div>
        <a class="btn btn-success disabled" id="gist_link" href="javascript:;" target="_blank">
            <i class="icon-file-text"></i> Page Source
        </a>

        <form class="navbar-form pull-right" id="gist-form">
            <div class="input-prepend">
          <span class="add-on">
            <i class="icon-github"></i> <i class="icon-dropbox"></i>
          </span>
                <input type="text" class="span2" id="gist-id" placeholder="GitHub Gist/File / Dropbox URL">
            </div>
        </form>


    </div>
</div>

<div class="row">
    <div id="content" class="span10">
        <%-: data | asciidoc %>
    </div>
    <div class="span1" id="sidebar_right">

        <div>
            <a id="status" class="label tooltip-below"
               title="Displays the overall status of all queries in this example.">Executing queries ...</a>
        </div>
        <div>
            <a href="/learn/graphgist#related" title="Neo4j GraphGist Collection"
               target="_blank"><span
                    class="badge badge-info"><i class="icon-beaker"></i> Examples!</span></a>
        </div>
        <div id="social-container">
            <div class="g-plusone" data-size="small"><i class="fa fa-google-plus"></i></div>
            <div class="fb-like"
                 data-layout="button_count" data-action="like" data-show-faces="true" data-share="false"></div>
            <div id="twitter-share-button"><a class="twitter-share-button" data-lang="en">Tweet</a></div>
            <div id="pd_rating_holder_7478426"></div>
        </div>
    </div>
</div>
<footer>
    <i class="icon-github-sign"></i> The GraphGist <a href="https://github.com/neo4j-contrib/graphgist">project</a>.
</footer>
<div id="fb-root"></div>
<script type="text/javascript" src="http://gist.neo4j.org/js/social.js"></script>
<script type="text/javascript" src="http://gist.neo4j.org/js/ga.js"></script>
<script type="text/javascript">
    /*@cc_on @*/
    /*@
     $( '#content' ).addClass( 'internet-explorer' );
     @*/
</script>


<!--</body>-->
<!--</html>-->
</div>
<% include ../foot %>
